package com.qf.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @Description: 公用常量
 * @Data: 2022/9/6 8:09
 * @Pacakge: com.qf.controller
 * @ClassName: RestTest
 * @Author: fan
 */
@Controller
@RequestMapping("rest")
public class RestTest {
    @GetMapping("/{id}")
    public String find(@PathVariable("id")int id){
        System.out.println("查询的id = " + id);
        return "success";
    }
    @PostMapping("/{id}")
    public String add(@PathVariable("id")int id){
        System.out.println("添加的id = " + id);
        return "success";
    }
    @PutMapping("/{id}")
    public String update(@PathVariable("id")int id){
        System.out.println("修改id = " + id);
        return "success";
    }
    @DeleteMapping("/{id}")
    public String delete(@PathVariable("id")int id){
        System.out.println("删除的id = " + id);
        return "success";
    }
}
